#pragma once
#include "Singleton.h"
#include <vector>
class NxPhysicsSDK;
class NxControllerManager;
class NxScene;
class UserAllocator;

namespace Physics
{
	class System : public Singleton<System>
	{
	public:
		System();
		~System();

		NxControllerManager* getControllerMgr() { return mControllerManager; }

		bool Init();
		void Update(float elapsedTime);
		void Destory();

		NxScene* CreateScene();
		void DestroyScene(NxScene* scene);

		float RayCast(NxScene* scene, const Vector3& pos, const Vector3& dir, float maxDistance, void** userData = NULL, DWORD groups = 0xffffffff);

	private:
		NxPhysicsSDK* mPhysicsSDK;
		NxControllerManager* mControllerManager;
		UserAllocator* mUserAllocator;
		float mSkinWidth;
	};
};
